layui.use(['layer','form'], function(){
    var $ = layui.$;
    var form = layui.form;
    $.post("/operator/getPermitted","",function (data) {
        if (data.code == '0'){
            rendererData(data.data);
        }else {
            layer.msg("权限查询失败。")
        }
    });

    var rendererData = function (data) {
        var html = '';
        $.each(data,function (index,value){
            html += '<button class="layui-btn layui-btn-primary layui-border-blue">'+value+'</button>'
        });

        $(".layui-btn-container").html(html);
        form.render();
    }


});